#include "stdafx.h"
#include "main.h"
#include "dialog.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

BEGIN_MESSAGE_MAP(CMainApp, CWinApp)
	ON_COMMAND(ID_HELP, OnHelp)
END_MESSAGE_MAP()

CMainApp::CMainApp()
{

}

CMainApp theApp;

BOOL CMainApp::InitInstance()
{
	WSADATA wsaData;
	CWinApp::InitInstance();
	WSAStartup(MAKEWORD( 2, 1 ), &wsaData);

	INITCOMMONCONTROLSEX InitCtrls;
	InitCtrls.dwSize = sizeof(InitCtrls);
	InitCtrls.dwICC = ICC_WIN95_CLASSES;
	InitCommonControlsEx(&InitCtrls);

	CMainDlg dlg;
	m_pMainWnd = &dlg;
	dlg.DoModal();
	return FALSE;
}

void CMainApp::OnHelp()
{
	ShellExecute(NULL, "open", "https://gitee.com/kerndev/clipboard_sync", NULL, NULL, SW_NORMAL);
}
